<!--  -->
<template>
  <div class="common-layout">
    <el-container>
      <el-header>
         <Logo></Logo>
         <Set></Set>
      </el-header>
      <el-container>
        <el-aside width="200px">
          <el-scrollbar height="100%" class="custom-scrollbar">
          <Menu></Menu>
        </el-scrollbar>
        </el-aside>
        <el-main>
       
          <router-view v-slot="{ Component }">
    <keep-alive>
      <component  :key="$route.name"  :is="Component" v-if="$route?.meta?.keepAlive"  />
    </keep-alive>
       <component  :key="$route.name" :is="Component" v-if="!$route?.meta?.keepAlive" />
  </router-view> 
  
          <!-- <RouterView></RouterView> -->
       
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>
<script lang="ts" setup>
import Logo from "../components/layout/Logo.vue";
import Set from "../components/layout/Set.vue";
import Menu from "../components/layout/Menu.vue";
import { reactive, toRefs, ref, onMounted } from "vue";
</script>
<style scoped>
.el-header {
  background: skyblue;
  display: flex;
  justify-content:space-between;
}
.el-aside {
  background-color: #304156;
}
.el-main {
  height: 100%;
  background: #f2f3f5;
}
.el-container {
  height: 100vh;
  overflow-y: hidden;
}
</style>
<style lang="less">
.el-scrollbar__bar.is-vertical {
  width: 6px;
}

/* 修改滚动条滑块 */
.el-scrollbar__thumb {
  background-color: #909399;
  &:hover {
    background-color: rgba(144, 147, 153, 0.8);
  }
}

/* 修改滚动条容器 */
.el-scrollbar__wrap {
  margin-right: -10px !important;
  margin-bottom: -10px !important;
}
</style>
